package com.dk.task;

public class MyThread04 implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName() + ":" + i);

            // 礼让线程，表示出让当前线程CPU执行权
            Thread.yield();
        }
    }
}
